package com.woniuxy.woniuticket.movieinfomodule.dao;

import com.woniuxy.woniuticket.movieinfomodule.pojo.UsersInfoLc;
import com.woniuxy.woniuticket.movieinfomodule.vo.UserVO;
import com.woniuxy.woniuticket.pojo.UsersInfo;
import io.lettuce.core.dynamic.annotation.Param;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
@Mapper
public interface UsersInfoDAO {
    int deleteByPrimaryKey(Integer id);

    int insert(UsersInfo record);

    int insertSelective(UsersInfo record);

    UsersInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(UsersInfo record);

    int updateByPrimaryKey(UsersInfo record);

    @Select("select * from t_users_info where telnumber=#{telnumber}")
    UsersInfo queryIdByTel(String telnumber);



    //查询用户信息
    List<UsersInfoLc> queryUserInfo(@Param("currentPage")Integer currentpage, @Param("pageSize")Integer pagesize, @Param("vo") UserVO vo);


    //用户信息更新
    @Update("update t_users_info set username=#{username} where telnumber=#{telnumber}")
    void updateUsername(UsersInfo usersInfo);
}